<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

    <title>Thinkphp5.1 留言版 </title>


   
  </head>
  <body>
 
 
 
     <div class="jumbotron text-center">
      <h1 class="display-4">Thinkphp5.1 留言版 </h1>
      <p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
      <hr class="my-4">
      <p>It uses utility classes for typography and spacing to space content out within the larger container.</p>
       
    </div>
 



    <div class="container">

<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="{:url('index/index/index')}">首页</a></li>
    <li class="breadcrumb-item active" aria-current="page">留言版</li>
  </ol>
</nav>

 

      
  <div class="row">
    <div class="col-8">
         

 


<table class="table table-hover table-dark">
  <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">留言标题</th>
      <th scope="col">留言内容</th>
      <th scope="col">留言时间</th>
    </tr>
  </thead>
  <tbody>



    {volist name='list' id='user'}
    

 

    <tr>
      <th scope="row"> {$user.id} </th>
      <td> <a href="{:url('index/index/view',['id'=>$user.id])}">{$user.title} </a></td>
      <td>{$user.content}</td>
      <td>{$user.create_time}</td>
    </tr>
 {/volist}
  </tbody>
</table>


{$list|raw}
 

  
 
    </div>
    <div class="col-4">
            <div class="card">
  <h5 class="card-header">发布留言</h5>
  <div class="card-body">


    <form  method="post"  action="{:url('index/index/add')}">
 
 <div class="form-group">
    <label for="formGroupExampleInput">留言标题</label>
    <input type="text" name="title"  class="form-control" id="formGroupExampleInput" placeholder="填写留言...">
  </div>
 

    <div class="form-group">
    <label for="exampleFormControlTextarea1">留言内容</label>
    <textarea class="form-control" name="content"  id="exampleFormControlTextarea1" rows="3"></textarea>
  </div>
  <button type="submit" class="btn btn-primary">提交留言</button>
</form>

 
     
  </div>
</div>
    </div>
     
  </div>
</div>



  

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
    <script src="https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
    <script src="https://cdn.bootcss.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  </body>
</html>